// ==================== 小说导入相关类型 ====================

export interface ParseNovelRequest {
  url: string
  platform?: string
}

export interface ConfirmImportRequest {
  tempId: string
  title: string
  author: string
  cover?: string
  category?: string
  tags?: string[]
  description?: string
  chapterCount?: string
  status?: string
  wordCount?: string
}

export interface NovelCrawlData {
  title: string
  author: string
  cover?: string
  category?: string
  tags?: string[]
  description?: string
  chapters?: number
  status?: string
  wordCount?: string
  platform: string
  platformName: string
  originalUrl: string
  chapterList?: Array<{
    title: string
    url?: string
  }>
}

export interface NovelCrawlDataWithTempId extends NovelCrawlData {
  tempId: string
}

export interface TempNovelData {
  tempId: string
  ...NovelCrawlData
}

export interface ImportResult {
  novelId: number
  title: string
  author: string
}

export interface ApiResponse<T = any> {
  code: number
  message: string
  data: T
}